package it.win4buy.events
{
    /**
     *
     *	autore:
     *  pierangelo.mancusi@gmail.com
     *
     */

    import flash.events.Event;

    public class UtilityEvent extends Event
    {
        public static const DATA_READY:String="UtilityEvent.DATA_READY";

        public static const FAULT:String="UtilityEvent.FAULT";

        public static const REFRESH_BINDING:String="UtilityEvent.REFRESH_BINDING";

        public static const CHANGE_BUTTON_REGISTRATION:String="UtilityEvent.CHANGE_BUTTON_REGISTRATION";

        public static const STARTUP_PLAY_MODE:String="UtilityEvent.STARTUP_PLAY_MODE";

        public static const CREATION_COMPLETE_PLAYVIEW:String="UtilityEvent.CREATION_COMPLETE_PLAYVIEW";


        //-------------------------------------------
        //
        // Private Properties
        //
        //-------------------------------------------

        /**
         * Generic object
         */
        private var _object:Object

        //-------------------------------------------
        //
        // Getters / Setters
        //
        //-------------------------------------------

        public function get object():Object
        {
            return _object;
        }

        public function set object(value:Object):void
        {
            _object=value;
        }



        //-------------------------------------------
        //
        // Constructor
        //
        //-------------------------------------------

        public function UtilityEvent(type:String, object:Object, bubbles:Boolean=false, cancelable:Boolean=false)
        {
            super(type, bubbles, cancelable);
            this.object=object;
        }


        override public function clone():Event
        {

            return new UtilityEvent(type, object, bubbles, cancelable);
        }

        //-------------------------------------------
        //
        // Private Methods
        //
        //-------------------------------------------


    }
}